//将我们http.js中封装好的  get,post.put,delete  导过来

import { axios_get, axios_post, axios_delete, axios_put, axios_url} from './http.js'

//按照格式确定方法名
export const jwt_send_get = p => axios_post("/user/login/", p)

export const login_post = p => axios_post("/user/login", p)

export const add_post = p => axios_post("/course/add_course", p)

export const qn_token_get = p => axios_get("/course/get_upload_video_token", p)

export const add_chapters_post = p => axios_post('/course/add_chapter', p)

// 绑定第三方登录：微博
export const weibo_binduser_post = p => axios_post("/oauth/weibo/bind", p)

export const weibo_callback_post = p => axios_get("/oauth/weibo", p)

// 绑定第三方登录：钉钉
export const oauth_binduser_post = p => axios_post("/oauth/dingding/bind", p)

export const oauth_callback_post = p => axios_get("/oauth/dingding", p)

export const image_code = p => axios_url('/user/code', p)

export const register_post = p => axios_post("/user/register_user", p)

export const getcourses_get = p => axios_get('/getcourses/', p)

// 获取全部课程
export const getcourses1_get = p => axios_get('/course/get_course', p)

export const get_course_info_get = p => axios_get('/course/courseinfo', p)

export const gettags_get = p => axios_get('/course/get_tag', p)

export const change_pwd = p => axios_put('/user/change_pwd')

export const user_info_get = p => axios_get('/user/user_info', p)

export const user_info_post = p => axios_post('/user/user_info/', p)

export const send_phone_code_post = p => axios_get('/user/phone_code', p)

export const verif_post = p => axios_post("/verif/", p)
export const add_sections_post = p => axios_post("/course/add_section", p)

//获取路径列表信息
export const getpaths_get = p => axios_get('/path/get_path', p)

//获取单个路径信息
export const get_path_info_get = p => axios_get('/path/get_path_info', p)

//获取热门路径信息
export const get_hot_path_get = p => axios_get('/path/get_path', p)

//路径关注 / 取关接口
export const path_follow_get = p => axios_get('pathfollow/', p)

//进入路径页面判断用户是否已经关注
export const is_path_follow_get = p => axios_get('ispathfollow/', p)


export const chapter_show_get = p => axios_get("/course/get_chapter", p)

// 获取单个商品信息
export const course_show_get = p => axios_get("/course/courseinfo", p)

// 获取作者信息
export const auth_info_get = p => axios_get("/authinfo/", p)
// 获取作者作品总数
export const course_count_get = p => axios_get("/coursecount/", p)
// 获取用户学习状态信息
export const user_lean_get = p => axios_get("/user/learninfo/", p)
// 用户添加课程
export const insert_learn_get = p => axios_get("/insertlearn/", p)

// 会员页面展示---请求会员列表接口
export const get_vip_list_get = p => axios_get('/vip/get_vip_list', p)

// 会员订单接口
export const get_vip_order_get = p => axios_get('/pay/create_order', p)

// 沙箱支付接口
export const get_alipay_get = p => axios_get('/pay/alipay', p)

// 订单入库库接口
export const get_order_mysql_post = p => axios_post('/pay/alipay', p)

export const get_check_pay_get = p => axios_get('pay/check_pay', p)

// 支付成功后，请求后端修改数据库参数
export const get_succeed_get = p => axios_get('/pay/get_alipay', p)

// 获取七牛云token
export const get_uptoken = p => axios_get('/user/uptoken/', p)

// 获取用户信息
export const user_get = p => axios_get('/user/get_user', p)

// 学习记录
export const courserecord = p => axios_get('/course/courserecord/', p)

// 获取评论
export const get_comments_get = p => axios_get('/course/comment/get_comment', p)

// 获取帖子
export const get_questions_get = p => axios_get('/get_questions/', p)

// 点赞评论
export const favorite_comment_post = p => axios_post('/course/favorite_comment/', p)

// 发表评论
export const publish_comment_post = p => axios_post('/course/comment/add_comment', p)

// 收藏课程
export const hoarding_course_post = p => axios_post('/course/hoarding_course', p)

// 训练营详情
export const drillcourse = p => axios_get('/drillcourse/', p)

// 获取视频
export const sectionvideo_get = p => axios_get('/course/sectionvideo', p)

// 获取用户(实验课程(学习的 & 关注的 & 发布的) & 实验报告 & 实验讨论)
export const learn_get = p => axios_get('/learnview/', p)

// 访客添加接口
export const add_visitor_post = p => axios_post('/visitor/', p)

// 获取访客
export const get_visitor = p => axios_get('/user/visitor', p)
// 生成优惠券
export const create_coupon_get = p => axios_get('/create_coupon/', p)

// 获取优惠券
export const coupon_list_get = p => axios_get('/coupon_list/', p)

// 获取实验豆
export const get_bean = p => axios_get('/getblan/', p)

// 秒杀购买成功后数量处理请求
export const purchase_get = p => axios_get('/purchase/', p)

// 活动页面加载
export const seckill_data_get = p => axios_get('/seckill_data/', p)

// 全局搜索
export const search_data_get = p => axios_get('/course/search', p)
// 课程推荐
export const reco_course_get = p => axios_get('/reco_course/', p)

// 发表报告
export const report_content_post = p => axios_post('/add_report/', p)

// 展示实验报告
export const report_list_get = p => axios_get('/repor_tlist/', p)

// book相关
export const getBookList = p => axios_get('/book_resource', p)

export const addBook = p => axios_post('/book_resource', p)

export const editBook = p => axios_put('/book_resource', p)

export const delBook = p => axios_delete('/book_resource', p)




























